package practicedemo30;

public class Student {
    private String Name;
    private int Age;

    //如果我没不写任何构造方法
    //那么，虚拟机会加上一个空参构造方法

    //空参构造形式
    public Student(){
        System.out.println("这是空参构造方法");
    }
    //有参构造
    public Student(String name , int age){
        this.Name = name;
        this.Age = age;
    }






    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public int getAge() {
        return Age;
    }

    public void setAge(int age) {
        this.Age = age;
    }

}
